﻿#ifndef MLABEL_H
#define MLABEL_H

#include <QLabel>
#include <QDebug>


class MLabel : public QLabel
{
    Q_OBJECT
public:
    MLabel(QWidget* parent = NULL,int fontSize=10);

public slots:
    void setText(const QString&);

protected:
    virtual void paintEvent(QPaintEvent* e);
    virtual void timerEvent(QTimerEvent* e);
    virtual void resizeEvent(QResizeEvent* e);

    void updateLabelRollingState();

private:
    int left=0;
    int timerId;
    int fontSize;
    QFont ft;
};

#endif // MLABEL_H
